package com.shop.dingdongshoppingapi.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class R {
	private int code;
	private String msg;
	private Object data;

	public static R ok(Object data){
		return new R(200,"OK",data);
	}
	public static R ok(){
		return  ok(null);
	}

	public static R fail(String msg){
		return new R(400,msg,null);
	}
	public static R fail(){
		return  R.fail(null);
	}
}
